package net.llz.service;

import net.llz.enums.ProductOrderPayTypeEnum;
import net.llz.exception.BizException;
import net.llz.model.OrderMessage;
import net.llz.model.ProductOrderDO;
import com.baomidou.mybatisplus.extension.service.IService;
import net.llz.request.ConfirmOrderRequest;
import net.llz.request.RepayOrderRequest;
import net.llz.util.JsonData;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Let-凡
 * @since 2023-01-30
 */
public interface ProductOrderService  {

    JsonData confirmOrder(ConfirmOrderRequest orderRequest) throws BizException;

    String queryProductOrderState(String outTradeNo);

    /**
     * 定时关单
     * @param orderMessage
     * @return
     */
    boolean closeProductOrder(OrderMessage orderMessage) throws BizException;

    /**
     * 回调监听
     * @param alipay
     * @param paramsMap
     * @return
     */
    JsonData handlerOrderCallbackMsg(ProductOrderPayTypeEnum alipay, Map<String, String> paramsMap);

    /**
     * 更具状态分页

     * @param page
     * @param size
     * @param state
     * @return
     */
    Map<String, Object> page(int page, int size, String state);

    /**
     * 重新支付
     * @param repayOrderRequest
     * @return
     */
    JsonData repay(RepayOrderRequest repayOrderRequest) throws BizException;
}
